package com.itheima.text1;

public class Text5 {
    public static void main(String[] args) {
        new Inter5() {
            @Override
            public void show() {
                System.out.println("匿名类内部方法");
            }
        }.show();

       Inter6 i = new Inter6() {
           @Override
           public void show1() {
               System.out.println("show1");
           }

           @Override
           public void show2() {
               System.out.println("show2");
           }
       };
       i.show1();
       i.show2();
    }
}

interface Inter5{
    void show();
}

class InterImt implements Inter5{

    @Override
    public void show() {
        System.out.println("show方法");
    }
}


interface Inter6{
    void show1();
    void show2();
}
